
<!doctype html>
<head>
        <meta name="keywords" content="羽毛球，球会，球场，教练">
		<meta name="charset" content="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/jquery.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/HomePage/md5.js"></script>
		<script type="text/javascript" src="__PUBLIC__/JS/jquery-form.js"></script>
</head>		

<div class="right_box">
		<div class="content content_hastab">	
			<form class='' id='' name="" action="__APP__/Home/Activity/updateActivity" method="post" enctype="multipart/form-data">
				<table  style="">
                <tbody>
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_name">活动名称</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="activity_name" id="activity_name" /><input type="hidden" name="activity_id" id="activity_id" ></input>
                   	   </td>
                   </tr>
                     
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_apply_time">活动报名开始时间</label>
                   	   </td>
                   	   <td>
                   		   <input type="date" id="activity_apply_time" name="activity_apply_time" value="" />
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_deadline_registration">活动报名截止时间</label>
                   	   </td>
                   	   <td>
                   		   <input type="date" id="activity_deadline_registration" name="activity_deadline_registration" value=""/>
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_begin_time">活动开始时间</label>
                   	   </td>
                   	   <td>
                   		   <input type="date" id="activity_begin_time" name="activity_begin_time" value=""/>
                   	    </td>
                   </tr>
				    <tr>
                   	   <td>
                   		   <label title='' for="activity_deadline">活动结束时间</label>
                   	   </td>
                   	   <td>
                   		   <input type="date" id="activity_deadline" name="activity_deadline" value=""/>
                   	    </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_contain_number">活动总人数</label>
                   	   </td>
                   	   <td>
                   		   <input type="number" id="activity_contain_number" name="activity_contain_number" value="" min="4" max="144" />
                   	    </td>
                   </tr>
				     <tr>
                   	   <td>
                   		   <label title='' for="activity_brief">活动简介</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="activity_brief" id="activity_brief" />
                   	   </td>
                   </tr>
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_content">活动描述</label>
                   	   </td>
                   	   <td>
                   	   	<textarea id="activity_content" name="activity_content" rows="4" cols="20"></textarea>
                   	    </td>
                   </tr>
				  
                   <tr>
                   	   <td>
                   		   <label title='' for="activity_gymnasium">活动举办场地</label>
                   	   </td>
                   	   <td>
                   		   <input type="text" name="activity_gymnasium" id="activity_gymnasium" placeholder="请填写体育馆编号" />
                   	   </td>
                   </tr>
                   <tr>
                        <td>
                              <label title='活动图片' for="activity_picture">活动图片</label>
                        </td>
                        <td>                
                              <input type="file" name="activity_picture" id="activity_picture"/>
                        </td>
                   </tr>
				   <td>
				   <label>是否公开</label>
				   </td>
				   <td>
				   <input id="radio1" name="is_public" type="radio" value="1" />公开<input id="radio0" name="is_public" type="radio" value="0"/>不公开
				   </td>
                  </tbody> 
                </table>
                <input type="submit" />
            </form>
		</div>
	</div>	
</div>

<script type="text/javascript">
 $(function(){
		$.post('__URL__/activityDetail',{'act_id':parent.selected},function(resultList){ 			   
			 ActivityJson=resultList.result;
			  document.getElementById("activity_id").value=ActivityJson.activity_id;
			  document.getElementById("activity_name").value=ActivityJson.activity_name;
			  document.getElementById("activity_apply_time").value=ActivityJson.apply_start_time.substr(0,10);
			  document.getElementById("activity_deadline_registration").value=ActivityJson.apply_end_time.substr(0,10);
			  document.getElementById("activity_begin_time").value=ActivityJson.activity_start_time.substr(0,10);
			  document.getElementById("activity_deadline").value=ActivityJson.activity_end_time.substr(0,10);
			  document.getElementById("activity_contain_number").value=ActivityJson.max_apply_number;
			  document.getElementById("activity_brief").value=ActivityJson.activity_brief;
			  document.getElementById("activity_content").value=ActivityJson.activity_content;
			  document.getElementById("activity_gymnasium").value=ActivityJson.activity_gymnasium;
			  var radio_id="radio"+ActivityJson.activity_if_public;
			   document.getElementById(radio_id).checked=true;
    	     },'json');  
			
		});
</script>